<template>
<div class="content">
    <el-button @click="getFileData">获取上传文件</el-button>
    <WebUpload
            :fileNumLimit="fileNumLimit"
            :fileSize="fileSize"
            :chunkSize="chunkSize"
            :uploadSuffixUrl="uploadSuffixUrl"
            :options="options"
            :fileListData="tableData"
    > </WebUpload>
</div>
</template>
<script>
import WebUpload from '../../common/upload/WebUpload'

export default {
    name: 'webupload',
    components:{
        WebUpload
    },
    data() {
        return {
            uploader:{},
            uploadBtnDisabled:false,
            uploadStaus:"el-icon-upload",
            tableData:[],//显示集合
            fileNumLimit:2,//文件总数
            fileSize:100*1024*1024*1024,//默认上传文件大小
            chunkSize:5*1024*1024,//默认文件片段
            uploadSuffixUrl:"http://localhost:8081/",
            options:{
                //允许上传的文件
                fileType:"doc,docx,pdf,xls,xlsx,ppt,pptx,gif,jpg,jpeg,bmp,png,rar,zip,mp4,avi",
                fileUploadUrl:"/upload/fileRecord/zone/upload",//上传地址
                fileCheckUrl:"/upload/fileRecord/zone/upload/md5Check",//检测文件是否存在url
                checkChunkUrl:"/upload/fileRecord/zone/upload/md5Check",//检测分片url
                mergeChunksUrl:"/upload/fileRecord/zone/upload/merge/",//合并文件请求地址
                headers:{}
            }
        }
    },
    methods: {
        getFileData(){
            console.log("tableData:",this.tableData);
            console.log("tableData len:",this.tableData.length);
            var fListData=this.tableData;
            fListData.forEach(function (item) {
                console.log("item:",item)
            })
        }
    }
}
</script>
<style>

</style>


